package com.qilu.careprogram.service.impl;

import com.qilu.careprogram.dao.UserDAO;
import com.qilu.careprogram.pojo.dto.UserDTO;
import com.qilu.careprogram.pojo.entity.User;
import com.qilu.careprogram.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description:
 * @CreateTime: 2025-04-23  21:16
 * @Version: 1.0
 */
@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserDAO userDao;

    @Override
    public User findByUserName(String username) {
        return userDao.findByUserName(username);
    }

    @Override
    public int insertUser(User user) {return userDao.insertUser(user);}

    @Override
    public Boolean checkAuthorityExists(String authority) {
        return userDao.checkAuthorityExists(authority) ;
    }

    @Override
    public List<User> getAllDoctorInfo(String department) {
        return userDao.getAllDoctorInfo(department);
    }

    @Override
    public int resetUser(String yusernam, User user) {
        return userDao.resetUser(yusernam, user);
    }

    @Override
    public int deletUser(String username) {
        return userDao.deletUser(username);
    }
}
